package com.rbac.web.db;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * @author gengaoliu
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public abstract class BaseDO implements Serializable {
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  @TableField(value = "create_time")
  private LocalDateTime createTime;

  @TableField(value = "create_by", fill = FieldFill.INSERT)
  private Integer createBy;

  @TableField(value = "update_time", fill = FieldFill.UPDATE)
  private LocalDateTime updateTime;

  @TableField(value = "update_by")
  private Integer updateBy;

  @TableLogic private Boolean deleted;
}
